<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  header("location:checklogin.php");
}
$i = 0;
$selectdriver = "SELECT driverId,licenseNo,driverName,truckId,address,telephone,mobile
                     FROM driver
                    ORDER BY driverId";
$selectdriverResult = mysql_query($selectdriver);
while($driverDataRow = mysql_fetch_array($selectdriverResult))
{
  $driverArray[$i]['driverId']   = $driverDataRow['driverId'];
  $driverArray[$i]['licenseNo']  = $driverDataRow['licenseNo'];
  $driverArray[$i]['driverName']       = $driverDataRow['driverName'];
  $driverArray[$i]['truckId']    = $driverDataRow['truckId'];
  $driverArray[$i]['address']    = $driverDataRow['address'];
  $driverArray[$i]['telephone']  = $driverDataRow['telephone'];
  $driverArray[$i]['mobile']     = $driverDataRow['mobile'];
  $i++;
}

include("./bottom.php");
$smarty->assign("driverArray",$driverArray);  
$smarty->display('driverList.tpl');
?>